'use strict';


const conn = require('./Conn');
//const Msg = require('../../../services/message/Msg');

module.exports = async function (params) {
    let authSql = '';
    let area_id = params.area_id;
    let area_level = params.area_level;
    switch (area_level) {
        case 1:
            authSql += ` AND dv.province_id = '${area_id}'`;
            break;
        case 2:
            authSql += ` 
          AND dv.city_id = '${area_id}'`;
            break;
        case 3:
            authSql += ` 
           AND pf.district_id ='${area_id}'`;
            break;
    }
    return authSql;
};